package com.softer.chengxin.modify.controller;

import com.softer.chengxin.corp.domin.Corp;
import com.softer.chengxin.modify.service.ModifyService;
import com.softer.chengxin.project.domin.Project;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Gong Zhiyang
 * @date 2019/9/10
 */
@RestController
@RequestMapping("/api/modify")
public class ModifyController {
    @Autowired
    private ModifyService modifyService;

    /**
     * 获取企业变更实体
     *
     * @param id 企业ID
     * @return 企业变更实体
     */
    @PostMapping("/getCorpModify")
    public Corp getCorpModify(int id) {
        return modifyService.getCorpModify(id);
    }

    /**
     * 获取項目变更实体
     *
     * @param id 項目ID
     * @return 項目变更实体
     */
    @PostMapping("/getProjectModify")
    public Project getProjectModify(int id) {
        return modifyService.getProjectModify(id);
    }
}
